# 给定一个字符串str_a = '  abc def gh    '
# 通过字符串操作,将其变成'hgfedcba'

str_a = '  abc def gh   '
str_ar = str_a.replace('  ', '  ')
print(str_ar[::-1])